package examTest;

public  class Alpha{
	
	public static void main(String[] args) {
		 
		Alpha a=new Beta();
		Beta b=(Beta) a;
		a.foo("test") ;
		a.bar("test");
		b.foo("test");
		b.bar("test");
		
	}
	
	
	
	
	public void foo(String... args){
		System.out.println("Alpha:foo");
		
	}
	
	public void bar(String a){
		System.out.println("Alpha:bar");
	}
	
}

class Beta extends Alpha {
	 
	public void foo(String  a){
		System.out.println("Beta:foo");
		
	}
	
	 
	public void bar(String a){
		System.out.println("Beta:bar");
	}
	
	
} 